/**
 * @Description: 该文件是用来配置serviceworker的
 * @author Fengli
 * @date 5/10/19
*/
const bgSyncPlugin = new workbox.backgroundSync.Plugin('needSyncRquestQueue', {
  maxRetentionTime: 24 * 60 // Retry for max of 24 Hours
})
workbox.routing.registerRoute(
  /\/api\/.*\/!*.json/,
  new workbox.strategies.NetworkOnly({
    plugins: [bgSyncPlugin]
  }),
  'POST'
)
